package com.tbit.uqbike.object.pojo.vo;

import com.tbit.uqbike.annos.Excel;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

/**
 * 运营报表实体类
 *
 * @Author:BUGTian
 * @DATE: 2022/11/10
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@Accessors(chain = true)
public class OperationReportVO {
    /**
     * 区域id
     */
    private Integer accountId;
    /**
     * 运营区域
     */
    private String areaName;
    /**
     * 日期
     */
    @Excel(name = "日期", sort = 1)
    private String day;
    /**
     * 车辆总数
     */
    @Excel(name = "车辆总数", sort = 2)
    private Long vehicleTotal;
    /**
     * 投放车辆总数
     */
    @Excel(name = "投放车辆总数", sort = 3)
    private Long punInVehicleTotal;
    /**
     * 未投放车辆总数
     */
    @Excel(name = "未投放车辆总数", sort = 4)
    private Long unPunInVehicleTotal;
    /**
     * 可运营车辆总数
     */
    @Excel(name = "可运营车辆总数", sort = 5)
    private Long operationVehicleTotal;
    /**
     * 不可运营车辆总数
     */
    @Excel(name = "不可运营车辆总数", sort = 6)
    private Long unOperationVehicleTotal;
    /**
     * 车均订单数
     */
    @Excel(name = "车均订单数", sort = 8)
    private String vehicleAverageOrder;
    /**
     * 车均订单收入
     */
    @Excel(name = "车均订单收入(元)", sort = 9)
    private String vehicleAverageMoney;
    /**
     * 换电总次数
     */
    @Excel(name = "换电总次数", sort = 10)
    private Long chargingTotal;
    /**
     * 挪车总次数
     */
    @Excel(name = "挪车总次数", sort = 11)
    private Long moveTotal;
    /**
     * 调度总次数
     */
    @Excel(name = "调度总次数", sort = 12)
    private Long dispatchTotal;
    /**
     * 累计用户量
     */
    @Excel(name = "累计用户量", sort = 13)
    private Long userTotal;
    /**
     * 新增用户量
     */
    @Excel(name = "新增用户量", sort = 14)
    private Long newUserTotal;

    /**
     * 产生订单车辆数
     */
    @Excel(name = "产生订单车辆数", sort = 7)
    private Long hasOrderMachineCount;

    /**
     * 最后计算未投放车辆总数 不可运营车辆数
     */
    public void compute() {
        //投放车辆总数 = 可运营车辆总数 + 不可运营车辆总数
        unPunInVehicleTotal = vehicleTotal - punInVehicleTotal;
        //车辆总数 = 投放车辆总数 + 未投放车辆总数
        unOperationVehicleTotal = punInVehicleTotal - operationVehicleTotal;
    }

}
